package com.xhsj.user.hr.process.overtime.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.xhsj.user.hr.base.BaseEntity;
import java.time.LocalDate;
import java.util.List;

import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 加班申请
 * </p>
 *
 * @author suxiaolin
 * @since 2020-10-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_hr_overtime_apply")
public class TbHrOvertimeApply extends BaseEntity<TbHrOvertimeApply> {

    private static final long serialVersionUID = 1L;

    /**
     * 部门id 逻辑外键 tb_global_organization表id
     */
    @TableField("organization_id")
    private Long organizationId;

    /**
     * 部门名称
     */
    @TableField("organization_name")
    private String organizationName;

    /**
     * 职位名称
     */
    @TableField("position_name")
    private String positionName;

    /**
     * 岗位id 外键 tb_global_organization表id
     */
    @TableField("position_id")
    private Long positionId;

    /**
     * 审核信息
     */
    @TableField("node_id")
    private Long nodeId;

    /**
     * 节点名称
     */
    @TableField("node_name")
    private String nodeName;

    /**
     * 加班事由
     */
    @TableField("reason")
    private String reason;

    /**
     * 加班时长
     */
    @TableField("work_length")
    private Integer workLength;

    /**
     * 加班总长
     */
    @TableField(exist = false)
    private String days;

    /**
     * 流程id 外键  tb_global_business id
     */
    @TableField("business_id")
    private Long businessId;

    /**
     * 加班类型 1 平时加班 2 周末加班
     */
    @TableField("type")
    private Integer type;

    @TableField(exist = false)
    private String handler;

    // 流程任务id
    @TableField(exist = false)
    private Long processTaskId;

    @TableField(exist = false)
    private String opinionText;

    @TableField(exist = false)
    private String workNum;


    @TableField(exist = false)
    private List<TbHrOvertimeApplyTime> timeList = Lists.newArrayList();

}
